<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-nested" prefix="nested" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="/tags/lwftags" prefix="lwftag" %>

<%@ page import="net.lwf.web.constant.IWebConstant"%>
<%@ page import="net.lwf.handler.util.ImageHtml"%>
   
<lwftag:sitemap />

<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="red">
	<tr>
		<td colspan="2"  height="60" align="left" valign="top" class="pmtitle">&nbsp;&nbsp;Site Map</td>
	</tr>
	<tr>
		<td colspan="2">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="green">
				<tr>
					<td width="10%">&nbsp;</td>
					<td width="90%"class="info_label">Grade: <span><lwftag:grade><bean:write name="grade" /></lwftag:grade></span></td>
				</tr>
				<logic:present name="<%=IWebConstant.SUBJECT_MENU_INFO %>" scope="request">
				<tr>
					<td width="10%">&nbsp;</td>
					<td width="90%" class="info_label">Subject: <span><nested:write name="<%=IWebConstant.SUBJECT_MENU_INFO %>" property="name" /></span></td>
				</tr>	
				</logic:present>	
				<logic:present name="<%=IWebConstant.TOPIC_MENU_INFO %>" scope="request">
				<tr>
					<td width="10%">&nbsp;</td>
					<td width="90%" class="info_label">Subject: <span><nested:write name="<%=IWebConstant.TOPIC_MENU_INFO %>" property="name" /></span></td>
				</tr>	
				</logic:present>		
				<tr>
					<td colspan="2"><hr></td>
				</tr>				
			</table>
		</td>
	</tr>

	
	<logic:present name="<%=IWebConstant.SUBJECT_MENU_INFO %>" scope="request">
	<nested:define id="subject_name" name="<%=IWebConstant.SUBJECT_MENU_INFO %>" property="name"/>
	<tr>	
		<td>&nbsp;</td>
		<td>
			<table border="0">
				<nested:iterate id="topic_n" name="<%=IWebConstant.SUBJECT_MENU_INFO %>" property="topicInfo">
				<nested:define id="topic_name" name="topic_n" property="name" />
				<tr>
					<td class="info_display">Topic: <span><nested:write name="topic_n" property="name" /></span></td>
					<td>&nbsp;</td>
				</tr>	
				<tr>
					<td>&nbsp;</td>
					<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="orange">
							<nested:iterate id="link_n" name="topic_n" property="linkInfo">
							<nested:define id="url"  name="link_n"  property="link"/>
							<tr>
								<td width="5%"><%=ImageHtml.getBulletImage()%></td>
								<td width="3%">&nbsp;</td>
								<%
									String linkurl = url + "&subject=" + subject_name + "&topic=" + topic_name;
								%>									
								
								<td width="92%" nowrap><a href="<%=linkurl%>"><nested:write name="link_n" property="name" /></a></td>
							</tr>
							</nested:iterate>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="2">&nbsp;</td>
				</tr>
				</nested:iterate>
			</table>
		</td>
	</tr>
	</logic:present>	
	
	<logic:present name="<%=IWebConstant.TOPIC_MENU_INFO %>" scope="request">
	<nested:define id="topic_name" name="<%=IWebConstant.TOPIC_MENU_INFO %>" property="name" />
	<tr>	
		<td>&nbsp;</td>
		<td>
			<table>
				<tr>
					<td class="info_display">Topic: <span><nested:write name="<%=IWebConstant.TOPIC_MENU_INFO %>" property="name" /></span></td>
					<td>&nbsp;</td>
				</tr>	
				<tr>
					<td>&nbsp;</td>
					<td>
						<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="cyan">
							<nested:iterate id="link_n" name="<%=IWebConstant.TOPIC_MENU_INFO %>" property="linkInfo">
							<nested:define id="url"  property="link"/>
							<tr>
								<td width="5%"><%=ImageHtml.getBulletImage()%></td>
								<td width="3%">&nbsp;</td>
								<%
									String linkurl = url + "&subject=" + request.getParameter(IWebConstant.SUBJECT) + "&topic=" + topic_name;
								%>											
								<td width="92%" nowrap><a href="<%=linkurl%>"><nested:write name="link_n" property="name" /></a></td>
							</tr>
							</nested:iterate>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>	
	</logic:present>		
</table>        